package net.eicp.nada;

import static net.mindview.util.Print.*;
/**Demonstration of both constructor
* and ordinary methed overloading.
* @author srp
* @author nada.eicp.net
* @version 1.0
*/

class Tree {
	int height;
	Tree() {
		print("Planting a seedling");
		height = 0;
	}
	Tree(int initialHeight) {
		height = initialHeight;
		print("Creating new Tree that is " + height + " feet tall");
	}
	void info() {
		print("Tree is " + height + " feet tall");
	}
	void info(String s) {
		print(s + ": Tree is " + height + " feet tall");
	}
}

public class Sixteen {
	public static void main(String[] args) {
		for (int i = 0; i < 5; i++) {
			Tree tree = new Tree(i);
			tree.info();
			tree.info("overloaded method");
		}
		// Overloaded constructor:
		new Tree();
	}
}
